export const constantRoutes = [
  {
    path: '/login',
    component: () => import('@/views/login/index.vue'),
    name: 'Login',
    meta: {
      title: '登录',
      hidden: true
    }
  },
  {
    path: '/:catchAll(.*)',
    component: () => import('@/views/error/404.vue'),
    name: 'catchAll',
    meta: {
      title: '404',
      hidden: true
    }
  },
  {
    path: '/',
    component: () => import('@/layout/index.vue'),
    name: 'Layout',
    redirect: '/home',
    children: [
      {
        path: '/home',
        component: () => import('@/views/home/index.vue'),
        meta: {
          title: '首页',
          hidden: false,
          icons: 'Eleme'
        }
      }
    ]
  },
  {
    path: '/user',
    component: () => import('@/layout/index.vue'),
    name: 'User',
    meta: {
      title: '用户管理',
      hidden: false,
      icons: 'User'
    },
    // redirect: '/message',
    children: [
      {
        path: '/user/message',
        component: () => import('@/views/user/index.vue'),
        meta: {
          title: '用户信息',
          hidden: false,
          icons: 'ChatDotRound'
        }
      },
      {
        path: '/user/edit',
        component: () => import('@/views/user/edit.vue'),
        meta: {
          title: '用户编辑',
          hidden: false,
          icons: 'Edit'
        },
        children: [
          {
            path: '/user/edit/one',
            component: () => import('@/views/user/edit.vue'),
            meta: {
              title: '用户编辑one',
              hidden: false,
              icons: 'CirclePlusFilled'
            }
          },
          {
            path: '/user/edit/two',
            component: () => import('@/views/user/edit.vue'),
            meta: {
              title: '用户编辑two',
              hidden: false,
              icons: 'RemoveFilled'
            }
          }
        ]
      }
    ]
  },
  {
    path: '/common',
    component: () => import('@/layout/index.vue'),
    name: 'Common',
    meta: {
      title: '公共组件',
      hidden: false,
      icons: 'Help'
    },
    children: [
      {
        path: '/common/dialog',
        component: () => import('@/views/dialog/index.vue'),
        meta: {
          title: '弹框',
          hidden: false,
          icons: 'HelpFilled'
        }
      },
      {
        path: '/common/richtext',
        component: () => import('@/views/richtext/index.vue'),
        meta: {
          title: '富文本',
          hidden: false,
          icons: 'Crop'
        }
      },
      {
        path: '/common/upload',
        component: () => import('@/views/upload/index.vue'),
        meta: {
          title: '图片上传',
          hidden: false,
          icons: 'Position'
        }
      },
      {
        path: '/common/usesvg',
        component: () => import('@/views/usesvg/index.vue'),
        meta: {
          title: 'svg使用',
          hidden: false,
          icons: 'Aim'
        }
      }
    ]
  },
  {
    path: '/function',
    component: () => import('@/layout/index.vue'),
    name: 'Function',
    meta: {
      title: '公共方法',
      hidden: false,
      icons: 'InfoFilled'
    },
    children: [
      {
        path: '/function/echarts',
        component: () => import('@/views/echarts/index.vue'),
        meta: {
          title: 'echarts',
          hidden: false,
          icons: 'Histogram'
        }
      },
      {
        path: '/function/loadsh',
        component: () => import('@/views/loadsh/index.vue'),
        meta: {
          title: 'loadsh',
          hidden: false,
          icons: 'Finished'
        }
      }
    ]
  },
  {
    path: '/goods',
    component: () => import('@/layout/index.vue'),
    name: 'Goods',
    meta: {
      title: '商品管理',
      hidden: false,
      icons: 'ShoppingCart'
    },
    children: [
      {
        path: '/goods/attribute',
        component: () => import('@/views/goods/attribute/index.vue'),
        meta: {
          title: '商品属性',
          hidden: false,
          icons: 'ShoppingBag'
        }
      },
      {
        path: '/goods/spu',
        component: () => import('@/views/goods/spu/index.vue'),
        meta: {
          title: 'SPU管理',
          hidden: false,
          icons: 'Remove'
        }
      },
      {
        path: '/goods/sku',
        component: () => import('@/views/goods/sku/index.vue'),
        meta: {
          title: 'SKU管理',
          hidden: false,
          icons: 'Message'
        }
      }
    ]
  },
  {
    path: '/setting',
    component: () => import('@/layout/index.vue'),
    name: 'Setting',
    redirect: '/home',
    children: [
      {
        path: '/setting',
        component: () => import('@/views/setting/index.vue'),
        meta: {
          title: '系统设置',
          hidden: false,
          icons: 'Setting'
        }
      }
    ]
  },
  {
    path: '/permission',
    component: () => import('@/layout/index.vue'),
    name: 'Permission',
    children: [
      {
        path: '/permission',
        component: () => import('@/views/permission/index.vue'),
        meta: {
          title: '权限管理',
          hidden: false,
          icons: 'Lock'
        }
      }
    ]
  }
]
